package com.java.simple.smallspring.scan;

import com.java.simple.smallspring.stereotype.Component;
import java.util.Random;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * @author zhoujunlin
 * @date 2022年09月28日 14:38
 * @desc
 */
@ToString
@Setter
@Getter
@Component("userService")
public class UserService implements IUserService {

    private String token;

    @Override
    public String queryUserInfo() {
        try {
            Thread.sleep(new Random(1).nextInt(100));
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return "zhoujl:10025:上海";
    }

    @Override
    public String register(String userName) {
        try {
            Thread.sleep(new Random(1).nextInt(100));
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return "注册用户:" + userName + ":success!";
    }
}
